package com.example.utils;


import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * The type Biz exception handle.
 */
@ControllerAdvice
@ResponseBody
public class BizExceptionHandle {

    /**
     * Handle http message not readable exception result data.
     *
     * @param ex the ex
     * @return the result data
     */
    @ExceptionHandler(BisException.class)
    public ResultData handleHttpMessageNotReadableException(BisException ex) {
        //返回异常处理
        return ResultUtils.error(ex.getMessage(), null);
    }
}